package cn.com.git.example.common.auth;

import cn.com.git.example.common.base.BaseAuthenticationDTO;
import cn.com.git.example.common.base.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 鉴权dto
 *
 * @author zhangzhenfu
 * @Description
 * @date 2020/2/20 14:09
 */
@ApiModel
@Data
public class AuthenticationDTO extends BaseAuthenticationDTO {

    @ApiModelProperty(value = "token信息")
    private String token;

    @ApiModelProperty(value = "用户信息")
    private SysUser sysUser;

    @ApiModelProperty(value = "数据权限：城市id")
    private List<Integer> cityIdList;

    @ApiModelProperty(value = "资源权限：资源id")
    private List<Integer> resourceIdList;

    @ApiModelProperty(value = "是否启用验证码验证，true启用，false停用")
    private boolean verifyCodeEnable;

    @ApiModelProperty(value = "等待秒数")
    private int waitSeconds;

    @ApiModelProperty(value = "会话id")
    private String loginProcessSessionId;

    @ApiModel
    @Data
    public static class SysUser extends BaseDTO {
        @ApiModelProperty(value = "ID")
        private Integer id;
        @ApiModelProperty(value = "姓名")
        private String name;
        @ApiModelProperty(value = "账号")
        private String account;
    }

}
